package routers

import (
	"github.com/gin-gonic/gin"
	"net/http"
)

func ApiRoutersInit(router *gin.Engine) {
	api := router.Group("/api")
	{
		api.GET("/user", func(c *gin.Context) {
			c.JSON(http.StatusOK, gin.H{"code": 200, "msg": "ok"})
		})
		api.GET("/news", func(c *gin.Context) {
			c.JSON(http.StatusOK, gin.H{"title": "这就是新闻"})
		})
	}
}
